<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<#include "../../common/res.html">
		
		<script type="text/javascript">
			function doDelete(id){
				if(confirm("确定删除?")){
					window.location.href="${s.base}/template/deleteTemplate.html?id="+id;
				}
			}
			
			
		</script>
	</head>
	
	<body class="bg">
		<#include "../../common/top.html">
		
		<div class="content">
			<div class="block-nav">
				<#include "../../common/nav.html">
			</div>
			
			<div class="block-content" >
			
				<div class="block-content-nav">
					<span class="title">专题管理</span>
				</div>
				
				<div class="block-content-description">
					<span>
						模板管理
					</span>
				</div>
				<form id="queryPageForm" action="${s.base}/template/templateManager.html?id_sbj=${id_sbj!}">
				<div class="block-content-content">
					<table class="fm-table">
						<thead>
							<tr >
								<td >模板文件名</td>
								<td >模板分类</td>
								<td >关键字</td>
								<td >创建人</td>
								<td >创建时间</td>
								<td style="width: 250px;">
									<input onclick="window.location.href='${s.base}/template/toTemplateMerge.html?id_sbj=${id_sbj!}'" class="btn" type="button" value="添 加"/>
								</td>
							</tr>
						</thead>
						<tbody>
							<input id="id_sbj" name="id_sbj" type="hidden" value="${RequestParameters['id_sbj']!}"/>
							<#if pagination.items??>
							<#list pagination.items as row>
							<#if row_index %2 == 0>
							<tr >
							<#else>
							<tr class="even-tr">
							</#if>
								<td>${row.name!}</td>
								<td>
									<select id="category" name="category" disabled="disabled" >
										<option value ="template" <#if row.category=="template"> selected="selected" </#if>>一般模板</option>
										<option value ="resource" <#if row.category=="resource"> selected="selected" </#if>>资源文件</option>
									</select>
								</td>
								<td>${row.keyWord!}</td>
								<td>${row.creater!}</td>
								<td>${(row.createtime?string("yyyy-MM-dd"))!}</td>
								<td>
									<a href="javascript:void(0);" onclick="doDelete('${row.id}')">删除</a>&nbsp;
								    <a href="${s.base}/template/toTemplateMerge.html?id=${row.id}" >修改</a>
								    <a href="${s.base}/template/temp/${row.dirname}/index.html" target="_blank">浏览</a>
								    <a href="${s.base}/template/tempEditer.html?id=${row.id}" >模板编辑</a>
								    <a href="${s.base}/template/tempDownload.html?id=${row.id}" target="_blank">下载</a>
								    <a href="${s.base}/template/tempStaticCreate.html?id=${row.id}" target="_blank">静态化</a>
								</td>
							</tr>
							</#list>
							</#if>
						</tbody>
					</table>
					<#include "../../common/pagination.html">
				</div>
				</form>
			</div>
			
			<div style ="display:none"> 
				<input type="file" name="_f" id="_f" multiple="multiple" /> 
			</div>
			
			<div class="clearfloat"></div>
		</div>
		
		<#include "../../common/footer.html">
	</body>
	
</html>
